Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
📝 WalkthroughWalkthroughThe default smoothing parameter for the chart filter has been modified. The Changes
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@app/composables/useSettings.ts`:
- Line 76: The shallow-merge behavior of useLocalStorage with mergeDefaults:true
means the new smoothingTau default won't be applied to existing persisted
settings; add a migration step in the useSettings composable to normalise stored
settings on load (e.g., in the logic that calls useLocalStorage or immediately
after retrieving its value) that performs a deep merge or explicitly sets
chartFilter.smoothingTau to 0 when it is undefined, implementing a small
migrateSettings (or applyDefaultsToStoredSettings) helper to walk nested keys
and preserve existing user values while injecting the new default.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 425379e5-ba07-4c41-a8e1-29befc22a71a
📒 Files selected for processing (1)
app/composables/useSettings.ts
|
@jycouet |
patak-cat
left a comment
There was a problem hiding this comment.
this makes sense to me
Resolves #2510
Previous default data correction settings had a
smoothingTauset to 1, which had the advantage of displaying nicer looking trends, but the disadvantage of correcting intermediate values, which can be perceived as an error by new visitors, when comparing the downloads to the npmjs chart.This sets the default
smootingTauto 0, to show raw data to all users, until they decide to tweak data correction knobs by themselves.This does not change the impacts of manual corrections, which remain applied by default.
Note
I think we should have these settings made available in the global settings page, because they can be hard to locate (downloads chart modal, inside a details is kind of hidden...). This would require adding a stats section in the settings page, and would be the topic of a separate issue.